/**
 * Copyright 2018-2020 victor & highset (http://www.highset.cn)
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.highset.modules.base.factory;

import cn.highset.modules.base.entity.Activity;

/**
 * 活动创建工厂
 */
public class ActivityFactory {

    /**
     * 活动修改
     */
    public static Activity edit(Activity newBean, Activity oldBean) {
        if (newBean == null || oldBean == null) {
            return oldBean;
        } else {
            oldBean.setActivityName(newBean.getActivityName());
            oldBean.setActivityNameEn(newBean.getActivityNameEn());
            oldBean.setTimeStart(newBean.getTimeStart());
            oldBean.setTimeEnd(newBean.getTimeEnd());
            oldBean.setAddress(newBean.getAddress());
            oldBean.setAddressEn(newBean.getAddressEn());
            oldBean.setOrganizer(newBean.getOrganizer());
            oldBean.setOrganizerEn(newBean.getOrganizerEn());
            oldBean.setUndertake(newBean.getUndertake());
            oldBean.setUndertakeEn(newBean.getUndertakeEn());
            oldBean.setIntroduction(newBean.getIntroduction());
            oldBean.setIntroductionEn(newBean.getIntroductionEn());
            oldBean.setShowTime(newBean.getShowTime());
            return oldBean;
        }
    }

}
